Time Split Tracker
Created by Michael "dunnius" Dunn



Features:
The splits file and most ini settings can be modified using contextual menus.  The menus depend on what text is right clicked.  If you right click on nothing, the menu is general settings for Time Split Tracker.  In the subscreens, you can hit escape to exit the screens.

When no splits are loaded, the timer can still be used.  In that mode, an alarm can be set up. When the timer goes off, hitting any key will stop the alarm.  The alarm can be reset by resetting the timer.

There are attempt counters for the current session and the overall totals for tracking.

Multiple comparison columns can be set up for extra comparisons.  The last comparison is the one that is compared against the Current column.  The columns can be moved around.

Splits can have notes which help to analyze splits.  Double-clicking on the split will bring up a screen where notes can be entered.  You can also change the split time or elapsed depending on mode.  There is a mode for each column to show the elapsed instead of the time.  There is also a default setting on startup for the elapsed mode.
When there is a note for a split, the time will be underlined.  The same will happen in the best split column for a difference if there is a new best split.  There is a setting for the minimum amount of time to consider a best split.
The background color that marks a best split and when there is a note can each be customized.

There are customizable counters to track events.  Making a split will add the counts to the split's notes, and when a run is completed, the grand totals will be added to the last split's notes.

The counters have a popup display for easy viewing of the counters.  The hotkey is a toggle, but hitting any key will make the popup go away, and also do the command assigned to it.

The counters display is in the format of "[c] / [t]".  [c] is the counter for the current split, and [t] is the total for all splits.

The splits can be displayed vertically or horizontally.  Also, the timer area can be above or below the splits, and the attempt counters can be on the right or the left side.  The spacing for the rows and columns for the splits can be customized, as well as the fonts and colors, including the colors for positive/negative differences.  The same applies to the timer/diff, attempt counters, and the main background color.

There are colors for positive differences(behind splits), negative differences(ahead of splits) and one for zero.  There is a setting for a difference to consider small change so it is easy to see differences that are close to zero.

There is an option in the split file for a timer offset.  When the timer is negative there is a separate customized color.  During that time, no splits can be made since it wouldn't make sense.  When the timer is behind the next current split, the timer will use either of the positive colors, otherwise it will be zero color.
The timer difference is based on the expected time where the split should happen, which is the elapsed of the next split from the last actual split.

The split file can have an image, and each split can have a image.  The image is displayed to the left of the titles.  The image size can be customized just like the text.

There is an option to have a background image in the background.

The position of screen is saved so it will always be in the same place.  There are settings to limit the height(for vertical splits) or width(horizontal splits).  There are also settings to add extra spacing at the bottom/right if needed.

The screen's update rate can be modified.  This affects how often the values on the screen update.

The Best Splits and Current Splits columns can be hidden to reduce the width(height in horizontal mode) of the screen.  The attempts counter can be hidden as well.
The Split Difference row can be hidden to reduce the height(width in horizontal splits) of the screen.  This makes the split times show the difference when a split is made.
This also enables scrolling which can be done manually with the mouse wheel.  There is a setting to reverse the scroll direction of the wheel.

The status messages that show in the Timer Difference when the timer is paused (Ready, Paused, New Best, and Done are the defaults) can be customized.

There is a feature to protect against accidentally doubling a split, skip, or undo by not accepting the input for a short time.  This can be customized.

There are multiple settings for autosaving (splits, run, split state, and logging) to make things easier.

The split state file creates a snapshot of Timer and the current splits, which can be loaded at a later time.  This is useful for a segmented run when you want to use the same timer for all segments, but close Time Split Tracker between segments.  This is also useful with the Autosave Split State to restore the state in case the computer crashes.
Loading a split state file will automatically load the splits file that was used to create it.  Make sure the 2 files are in the same folder.

The log file stores the splits of completed runs and also reset runs.  There is a split history graph screen for comparing the runs as well as individual splits over time.  It also shows the number of reset runs and the percentage rate for resets.

There is a feature to auto-upload completed runs and its splits.  The settings are saved in a separate ini file because it stores the username and password along with the other settings.  When Time Split Tracker is started up, if all the required settings are set, auto-upload is turned on automatically.
To change the settings when it is turned on, turn auto-upload off and back on.  That will bring the screen up. Auto-upload is only turned on if all the settings are set. 
When loading a splits file or a split state file and the auto-upload is turned on, it will bring up the screen so you can change the game info and verify that it is correct.  That way you are less likely to forget to change the game/category.



Settings in Time Split Tracker.ini:
Counters section:
ClearSplitCountersHotkey is the hotkey in the menu for clearing the counters for the current split.
PopupCountersHotkey is the hotkey in the menu for toggling the popup display for the counters.
CounterPanelColor is the background color of the popup window.
PanelHeaderFontColor, PanelHeaderFontName, and PanelHeaderFontSize customize the display of the counter name.
PanelDataFontColor, PanelDataFontName, and PanelDataFontSize customize the display of the counter information.
Each entry for a counter is two entries.  C[n]Desc is its description that shows up in the menu, C[n]Hotkey is an optional hotkey for that menu for quick entry.  [n] is an integer value starting with 1 that must be in sequential order.  If there is a gap in the values everything after the gap will be ignored.



Key section:
DoubleKeyWaitSec is the required amount of delay in seconds between key presses to prevent accidentally doubling a split, skip, or undo.  It can be set to 0 to be disabled.
The rest of the items in the section are hotkeys for the various menu items.  To add a modifier key to the hotkey, add Ctrl+, Alt+, and/or Shift+ before the hotkey with no space between.  Some of the other hotkey names are: Space, Tab, BkSp (Backspace), Ins (Insert), Del (Delete).

Misc section:
AutoSaveBestSplits is set to Y to automatically save the best splits on a completed run or when a reset is done.
AutoSaveBestRun is set to Y to automatically save a new best run when a run is completed.
AutoSaveSplitState is set to Y to automatically save a split state file, which happens every time the timer updates.
AutoLogRuns is set to Y to add and entry to the log every time there is a reset or completed run.
BestSplitMinElapsedSec is the minimum amount of elapsed time in seconds to consider a new best split.  This prevents accidentally overwriting the best splits.
DefaultElapsedMode is set to Y to default showing the elapsed splits instead of the actual time.  The mode for each column can be changed in Time Split Tracker.
SmallChangeSeconds is the amount of time in seconds from zero that is considered a small change, which will use the small change color instead of the large change.
TimerModeAlarmTime is the time in the format of h:mm:ss.zz for when the timer goes off, which only happens when it is in timer mode.  Setting it to 0 will disable the alarm.
TimerModeAlarmFile is the wav file (not sure what other file formats work) that is played when the alarm goes off.  The Path is relative to Time Split Tracker.  Setting it to blank or an invalid file will disable the alarm.

Window section:
Top and Left specifies the default position for the Time Split Tracker screen.  They get saved when Time Split Tracker closes.
MaxHeight specifies the height limit of the window in vertical mode.  The window will auto size to exactly fill the data, but if MaxHeight is exceeded, it will scroll.
MaxWidth operates the same way as MaxHeight, but this is only for horizontal mode.
TimerAreaHeight sets the height of the area that has the timer and attempts panel.
FooterHeight and FooterWidth add vertical and horizontal space, respectively, to the bottom and right, respectively, of the window (right/bottom side in horizontal mode).  This is useful for WINE which adds stuff to the lower right corner.
HeaderColsHeight  sets the height of the column headers.
RowHeight sets the height of the rows.
RowHeightShort sets the height of the rows when the difference rows are hidden.
ImageSize is the height and width of the images.  Set to 0 to never show any pictures.
HeaderColumnWidth sets the width of the row headers column.
DataColumnWidth sets the width of the other columns.
TimerOnLeft is set to Y to put the timer on the left of the screen, otherwise it will be on the right.
TimerOnTop is set to Y to put the timer on the top of the screen, otherwise it will be on the bottom.
HorizontalMode is set to Y to make the splits appear horizontally.  This is useful for widescreen streams.
ReverseMouseScroll is set to Y to reverse the direction of the scrolling for the mouse wheel.
HideAttemptCounters is set to Y to hide the counters for the number of attempts.
HideBestSplits, HideCurrentSplits, and HideDiffRows hide the Best Splits column, the Current Splits column, and the second row of each split line, respectively.  Set it to Y to hide.
DisplayUpdateInterval is the time in milliseconds between when the screen updates.  This value is useful for compatibility with the streaming software frame rates.  The default value is 75.

Layout section:
BackgroundColor is the color of the background of the main Time Split Tracker screen.
BackgroundFileName is the file name of the image that will be shown in the background.  It will not stretch the image, and any area not covered by it will show the background color.
NewBestSplitBackgroundColor is the color of the background of the split in the best splits column when there is a new best split.
NotesBackgroundColor is the color of the background of a split that has notes.
TimerFontName and TimerFontSize customize the main timer.
TimerNegTimeColor is the color when the timer's time is negative.  The other colors are set by the Diff[x]Colors.
TimerDiffFontName and TimerDiffFontSize customize the difference value next to the timer.  The colors are set by the Diff[x]Colors.
AttemptCounterFontName, AttemptCounterFontSize, and AttemptCounterFontColor customize the attempt counter.
TitleFontName, TitleFontSize, and TitleFontColor customize the split file's description.
ColHeaderFontName, ColHeaderFontSize, and ColHeaderFontColor customize the column headers.
ColHeaderElapsedFontColor is the color of the column header when that column is in 'show elapsed' mode.
RowHeaderFontName, RowHeaderFontSize, and RowHeaderFontColor customizes the row headers.
CurrentRowColor is the color of the row that will have the next split.
SplitTimesFontName, SplitTimesFontSize, and SplitTimesFontColor customizes the split's time/elapsed value.
SplitDiffFontName and SplitDiffFontSize customize the split's difference value.  The colors are set by the Diff[x]Colors.
DiffNegativeLargeColor is the color for a difference that is negative (gaining time) and it is more than SmallChangeSeconds.
DiffNegativeSmallColor is the color for a difference that is negative (gaining time) and it is less than SmallChangeSeconds.
DiffPositiveLargeColor is the color for a difference that is positive (losing time) and it is more than SmallChangeSeconds.
DiffPositiveSmallColor is the color for a difference that is positive (losing time) and it is less than SmallChangeSeconds.
DiffZeroColor is the color for a difference that is zero.  This is also the color of the timer when it is not less than zero and not more than the current split (when it is more, it shows the DiffPositive colors).
TimerDiffStatusReady, TimerDiffStatusPaused, TimerDiffStatusNewBest, and TimerDiffStatusDone are the various text that is displayed in the TimerDiff when the timer is not running.
TimerTimeFormatMode and TimerDiffTimeFormatMode set the display format of split times(and timer) and split diff times (and the timer diff).  The codes (and format) are: H (hh:mm:ss.cc), M (mm:ss.cc), S (ss.cc), and C (cc).  The first section of the time formats can be more than 2 digits.



Settings in AutoUpload.ini:
The section ServerList is a list of servers for uploading times/splits.  The name part of an entry is the URL without the http:// and the value is the description that will be displayed.

Settings section:
Server is the name part of the ServerList entry that is currently selected.  
Username and Password are self explanatory.  Password is not encrypted.
GameCode and GameCategoryCode are the codes from the current server of the game and category.
Version is the user field for extra info about the game version.
SaveUsername and SavePassword are set to Y to use Username and Password.  They can be turned off if you want extra security.
SubmitRunComments is set to Y to have a popup come up on a completed run to enter a comment for that run.



File Format for Splits File:
The files Time Split Tracker uses are tab delimited, so it is easily to modify this in a spreadsheet program.  Just save it as a tab delimited.

The first line is the info for the file.  Its first column is the total number of attempts for the splits.  The second column is the TimeOffset; the amount of time (can be negative) to offset the timer's starting time from zero.  The third column is the path and filename for the image for the splits file.  This is relative to the split file's location.  This is what is displayed next to the splits' title. 

The next line has the headers for the columns.  The first column is the title for the splits.  The second column is "Best Splits" which will be overwritten by the program since it is a reserved column.  The remainder of the columns are for the comparison splits.

The remainder of the lines are in pairs and have the split data.  The first line in the pair is the time data for the split.  The first column is the split name, and the remainder are the times for the split, except the best split which is the elapsed time.
The format must be in h:mm:ss.zz (zz is the hundredths of the second) or it will not be recognized properly.  The number of time data must match the number of headers.

The second line in the pair is the row's image file and the split notes.  The first column is the path and filename of the image for the split.  This is relative to the split file's location.
The rest of the columns are the notes for each time in the split.  Note that in a text editor/spreadsheet, a tab must be entered as |t and a return as a |n since the characters normally would break the file format.  These show up normally in the the notes editing in Time Split Tracker.



File Format for Split State File:
This is also tab delimited.

The first line's column 1 is the string "TSTSplitState" to mark that it is not a splits file.  Column 2 is the name of the splits file that was used to create this state file, which must be in the same folder.

The second line's column 1 is the timer value when the state was made.  The next column is the row number (0 based) that will get the next split.

The remainder of the rows are the time values for each split row in the Current column, up to before the row that will get the next split.



File Format for Run Log File:
This is also tab delimited.

The first line's column 1 is the string "TSTSplitLog" to mark that it is not a splits file.  Column 2 is the name of the splits file that was used to create this log file, which must be in the same folder.

The remainder of the rows are the entries for a run.  Column 1 is the date and time in "yyyy/mm/dd hh:mm".  Column 2 is 'C' for a completed run or 'R' for a run that was reset early.  The remainder of the columns are the time entries, which for a completed run will be the number of rows in the splits file.



Compatibility:
Time Split Tracker works with Windows 2000 and newer.  Windows 95/98/ME have not been tested but may work.
Time Split Tracker works with WINE, so it can be run on Mac and Linux.
There are no installation prerequisites.

This program handles times up to at least 99:59:59.99.



Contact Info:
If you have any bugs, questions, or comments, you can contact me at the speeddemosarchive forums through thread or PM, or at the official IRC channel #timesplittracker on irc.speeddemosarchive.com.



-EOF-